<div class="bs-example">	
<h4> <?php echo __('Đáp án'); ?></h4>
	<table  class="table table-striped table-bordered">
	<tr>
                <th class="header">Id</th>
                <th class="header">Đáp án</th>
				<th class="header">Kết quả</th>
                <th class="header">Ngày tạo</th>
               
                <th class="header" ><?php echo __('Actions');?></th>
	</tr>
	<?php
	foreach ($answers as $answer):
        ?>
	<tr>
		<td width="5%" ><?php echo h($answer['Answer']['id']); ?>&nbsp;</td>
		<td width="40%"><?php echo h($answer['Answer']['name']); 
			//echo $this->Html->link(__($answer['Answer']['name']), array('controller'=>'answers','action' => 'index', $answer['Answer']['id'])); 
		?>&nbsp;
		
		</td>
		<td><?php if($answer['Answer']['ruler']==0){
							echo "<b style='color:red;'>sai</b>";
							}else{
								echo "<b style='color:#5CB85C'>đúng</b>";
							}?>&nbsp;</td>
		<td><?php echo h(date("d-m-Y H:s:i",strtotime($answer['Answer']['created']))); ?>&nbsp;</td>
		
		<td align="center">
			<?php echo $this->Html->link(__(''), array('action' => 'edits', $answer['Answer']['id']),array('title'=>'Sửa đáp án','class'=>'fa fa-pencil-square-o','style'=>'font-size:20px;padding: 0 2px;')); ?>
			<?php echo $this->Form->postLink(__(''), 
					array('action' => 'delete', $answer['Answer']['id']),
					array('title'=>'Xóa đáp án','class'=>'fa  fa-trash-o','style'=>'color:#000;font-size:20px;padding: 0 2px;'), 
					__('Bạn muốn xóa đâp án? ', 
					$answer['Answer']['id'])); ?>

                </td>
	</tr>
        <?php endforeach; ?>
	</table>
	<?php echo $this->element('pagination');?>
</div>